package com.wish.contract.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wish.common.core.annotation.Excel;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author Andy
 * @since 2022-11-19 09:24:23
 */
@Getter
@Setter
@TableName("tb_contract")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Excel(name = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 合同编号（系统生成）
     */
    @Excel(name = "合同编号", readConverterExp = "系统生成")
    @TableField("contract_no")
    private String contractNo;

    /**
     * 上一合同ID
     */
    @Excel(name = "上一合同ID")
    @TableField("last_contract_id")
    private Integer lastContractId;

    /**
     * 商户ID
     */
    @Excel(name = "商户ID")
    @TableField("business_id")
    private Integer businessId;

    /**
     * 部门ID
     */
    @Excel(name = "部门ID")
    @TableField("dept_id")
    private Integer deptId;

    /**
     * 部门编号
     */
    @Excel(name = "部门编号")
    @TableField("dept_no")
    private String deptNo;

    /**
     * 小区名(使用楼盘名称)
     */
    @Excel(name = "小区名(使用楼盘名称)")
    @TableField("premise_name")
    private String premiseName;

    /**
     * 房源ID
     */
    @Excel(name = "房源ID")
    @TableField("house_id")
    private Integer houseId;

    /**
     * 房源标题
     */
    @Excel(name = "房源标题")
    @TableField("house_title")
    private String houseTitle;

    /**
     * 房东ID
     */
    @Excel(name = "房东ID")
    @TableField("owner_id")
    private Integer ownerId;

    /**
     * 房东姓名
     */
    @Excel(name = "房东姓名")
    @TableField("owner_name")
    private String ownerName;

    /**
     * 房东证件号码（身份证）
     */
    @Excel(name = "房东证件号码", readConverterExp = "身份证")
    @TableField("owner_id_card")
    private String ownerIdCard;

    /**
     * 房东手机号
     */
    @Excel(name = "房东手机号")
    @TableField("owner_mobile")
    private String ownerMobile;

    /**
     * 租户名称
     */
    @Excel(name = "租户名称")
    @TableField("sign_user_name")
    private String signUserName;

    /**
     * 租户证件号（身份证）
     */
    @Excel(name = "租户证件号", readConverterExp = "身份证")
    @TableField("sign_user_card")
    private String signUserCard;

    /**
     * 租户手机号
     */
    @Excel(name = "租户手机号")
    @TableField("sign_user_mobile")
    private String signUserMobile;

    /**
     * 租户紧急联系电话
     */
    @Excel(name = "租户紧急联系电话")
    @TableField("sign_user_emergency_phone")
    private String signUserEmergencyPhone;

    /**
     * 租约期限开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租约期限开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("lease_start_time")
    private Date leaseStartTime;

    /**
     * 租约期限结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租约期限结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("lease_end_time")
    private Date leaseEndTime;

    /**
     * 收房月租金
     */
    @Excel(name = "收房月租金")
    @TableField("month_rent")
    private BigDecimal monthRent;  /**
     * 收房月租金
     */
    @Excel(name = "合同总租金")
    @TableField("total_rent")
    private BigDecimal totalRent;

    /**
     * 房产押金
     */
    @Excel(name = "房产押金")
    @TableField("deposit_money")
    private BigDecimal depositMoney;

    /**
     * 合同签订时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "合同签订时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("con_sign_time")
    private Date conSignTime;

    /**
     * 合同录入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "合同录入时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("con_info_time")
    private Date conInfoTime;

    /**
     * 合同审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "合同审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("con_aud_time")
    private Date conAudTime;

    /**
     * 合同录入人
     */
    @Excel(name = "合同录入人", width = 30)
    @TableField("oper_id")
    private Integer operId;

    /**
     * 合同状态（1，草稿。2，已提交。3，已解约。4，已结束。9:作废
     */
    @Excel(name = "合同状态", readConverterExp = "合同状态（1，草稿。2，已提交。3，已解约。4，已结束。9:作废")
    @TableField("status")
    private Integer status;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @TableField("remark")
    private String remark;

    /**
     * 删除标识，0:未删除，1：删除
     */
    @TableField("del_flg")
    @Excel(name = "删除标识，0:未删除，1：删除")
    private Integer delFlg;

    /**
     * 房产类型：1.合租；2.整租；3.公寓
     */
    @TableField("house_lease_type")
    @Excel(name = "房产类型：1.合租；2.整租；3.公寓")
    private Integer houseLeaseType;

    /**
     * 创建用户ID
     */
    @TableField("create_userid")
    @Excel(name = "创建用户ID")
    private Long createUserid;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间")
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新用户ID
     */
    @TableField("update_userid")
    @Excel(name = "更新用户ID")
    private Long updateUserid;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间")
    @TableField("update_time")
    private Date updateTime;

}
